package com.swjd.service.impl;

import com.swjd.dao.OrdersMapper;
import com.swjd.pojo.Orders;
import com.swjd.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by hxl on 2019/5/31  8:53
 */
@Service
public class OrdersServiceImpl implements OrdersService {

    @Autowired
    private OrdersMapper ordersMapper;

    //添加订单信息
    @Override
    public int insertByOrders(Orders orders) {
        return ordersMapper.insertByOrders(orders);
    }

    ////修改订单信息
    @Override
    public int updateByOrders(Orders orders) {
        return ordersMapper.updateByOrders(orders);
    }

    @Override
    public List<Orders> selectUserByOrders(String username) {//用户查询订单信息
        return ordersMapper.selectUserByOrders(username);
    }

}
